<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设置过期日期')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-agentInfo-updateAgent">
            <div class="form-group">
                <label class="col-sm-3 control-label">代理编号：</label>
                <div class="col-sm-8">
                    <input class="form-control" type="text" readonly="true" name="agentNum" th:value="${agentInfo?.agentNum}"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">代理商名称：</label>
                <div class="col-sm-8">
                    <input class="form-control" type="text" readonly="true" name="agentName" th:value="${agentInfo?.agentName}"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">结束日期：</label>
                <div class="col-sm-8">
                    <input type="text" name="supportDate"  th:value="${agentInfo?.supportDate}" class="form-control" readonly/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">结束天数：</label>
                <div class="col-sm-8">
                    <input type="number" name="endDays" class="form-control" th:value="${agentInfo?.endDays}"/>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>说明：代理下的商户注册时间超过此天数,计算代理收益为交易档位</span>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "agentInfo/agentInfo";
        $("#form-agentInfo-cancelAgent").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/updateAgent", $('#form-agentInfo-updateAgent').serialize());
            }
        }


        $("input[name='supportDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

    </script>
</body>
</html>